<template>
  <div class="today-invite">
    <p>今日邀请好友</p>
    <p>{{person}}人</p>
  </div>
</template>
<script>
import api from '../../api'
import utils from '../../utils'
export default {
  data () {
    return {
      person: '',
      tokenval: ''
    }
  },
  created () {
    var timeStamp = String(Number(new Date()))
    this.tokenval = utils.AuthToken(timeStamp, this.$store.state.userkey)
    var params = {
      Tokenuser: this.tokenval,
      userid: this.$store.state.userID,
      timestamp: timeStamp
    }
    api.today(params).then(res => {
      console.log(res)
      this.person = res.data.userCnt
    })
  }
}
</script>

